<?php
/**
 * 竞品信息反馈模型
 */
class competeModel extends RelationModel {

	//表单验证
	public $_validate	=	array(
		array('modelId','require','请选择机型',1,'',1),
		array('price','require','请填写价格',1,'',1),
		array('agents','require','请填写代理商名称',1,'',1),
		array('agentsPolicy','require','请填写代理商政策',1,'',1),
		array('storePolicy','require','请填写门店政策',1,'',1),
		array('cmccPolicy','require','请填写移动政策',1,'',1),
    );
    
    
    protected $_link = array(
        'model'=>array(
            'mapping_type'          =>BELONGS_TO,
            'foreign_key'=>'modelId',
            'mapping_fields'=>'name',
        ),
        'user'=>array(
            'mapping_type'          =>BELONGS_TO,
            'foreign_key'=>'userId',
            'class_name'=>'admin',
            'mapping_fields'=>'realName,userName',
        ),        
    );


}
